<?php

namespace App\Http\Livewire;

use Illuminate\Support\Facades\Auth;
use Livewire\Component;

class ChatMessage extends Component
{
    public $chatMessage;
    public $myMessage;

    public function mount($chatMessage)
    {
        $this->chatMessage = $chatMessage;
        $this->myMessage = Auth::id() == $chatMessage->user_id;
    }

    public function render()
    {
        return view('livewire.chat-message');
    }
}
